<form name="editRetroactiveForm">
	<div class="form-group">
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>申请岗位：</div>
			<div class="col-sm-8 col-md-8 form-input">
				<select id="roleId" 
						name="roleId"
						class="form-control" 
						ng-model="editRetroactiveModel.retroactive.roleId">
                        <option ng-repeat="role in viewModel.roleList" value="{{role.roleId}}" ng-selected="viewRetroactiveModel.selected(role)">{{role.roleName}}--({{role.departmentCode}}){{role.departmentName}}</option>
			    </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>签到日期：</div>
			<div ng-class="editRetroactiveModel.divClass()">
			  	<div class="input-group datapicker" ng-class="{ 'has-error' : editRetroactiveForm.rAttendanceStratDate.$dirty && editRetroactiveForm.rAttendanceStratDate.$invalid }">
					<input name="rAttendanceStratDate" 
						   ng-model="editRetroactiveModel.retroactive.attendanceDate" 
						   ng-change="viewRetroactiveModel.attendanceDateChange()"
						   class="form-control datetime-picker" 
						   type="text" 
						   autofocus="autofocus"
						   maxLength="10"
						   z-datepicker-popup="{{viewModel.format}}"
						   is-open="viewModel.attendanceDateOpened"
						   datepicker-options="viewModel.dateOptions"
					       close-text="Close"
					       required
					       readonly
					       tabIndex="2">
					<span class="input-group-addon cursorPointer" ng-click="viewModel.attendanceDateOpen($event)"><i class="fa-calendar"></i></span>	
				</div>
			</div>
			<div class="col-sm-8 col-md-2 form-title" 
				 ng-show="editRetroactiveModel.dataMorningType==ture"
				 ng-hide="editRetroactiveModel.dataMorningType==false">
				跨天补签：<input type="checkbox"  ng-model="editRetroactiveModel.acrossCheckbox" ng-click="editRetroactiveModel.acrossCheckboxClick()"/>
			</div>
		</div>
		<div class="col-md-12 form-item" ng-if="editRetroactiveModel.dataMorningList.length<=0">
			<div class="col-sm-3 col-md-3 form-title">补签类型：</div>
			<div class="col-sm-8 col-md-8 form-input" >
			  	<div class="col-sm-2 col-md-3 form-title-left">
					<input name="retroactiveType" type="radio" 
						   ng-checked="editRetroactiveModel.rdoChecked('1')"
						   ng-click="editRetroactiveModel.onClick('1')"/>上班
					&nbsp;
					<input name="retroactiveType" type="radio"  
						   ng-checked="editRetroactiveModel.rdoChecked('2')"
						   ng-click="editRetroactiveModel.onClick('2')"/>末班   
				</div>
			</div>
		</div>
	    <div class="col-md-12 form-item" ng-if="editRetroactiveModel.checkboxlength==1">
			<div class="col-sm-3 col-md-3 form-title">考勤状态：</div>
			<div class="col-sm-8 col-md-8 form-input">
                <input id="attendanceState" class="form-control" disabled="disabled" ng-model="editRetroactiveModel.attendanceState" />
			</div>
		</div>
		<div class="col-md-12 form-item" 
			ng-if="editRetroactiveModel.dataMorningList.length<=0"
			ng-show="editRetroactiveModel.retroactiveValue==1"
			ng-hide="editRetroactiveModel.retroactiveValue==2">
			<div class="col-sm-3 col-md-3 form-title"></div>
			<div class="col-sm-8 col-md-8 form-input">
					原上班签到：
					<span ng-if="editRetroactiveModel.startTime != null">  
	                    {{editRetroactiveModel.startTime}}
	                </span> 
	                <span ng-if="editRetroactiveModel.startTime == null">  
	                    	无
	                </span> 
			</div>
		</div>
		<div class="col-md-12 form-item"
			 ng-show="editRetroactiveModel.retroactiveValue==1 && editRetroactiveModel.dataMorningList.length<=0"
			 ng-hide="editRetroactiveModel.retroactiveValue==2 && editRetroactiveModel.dataMorningList.length<=0"
			 >
			<div class="col-sm-3 col-md-3 form-title">
			<span style="color:red;">*</span>补签上班签到：</div>
			<div class="col-sm-8 col-md-8 form-input" >
			 	<div class="input-group" ng-class="{ 'has-error' : editRetroactiveForm.rAStartTime.$dirty && editRetroactiveForm.rAStartTime.$invalid}">
				 	<input  id="rAStartTime" 
				 		    name="rAStartTime" 
					 		class="form-control"
					 		ng-model="editRetroactiveModel.retroactive.startTime" 
					 		ng-click="viewModel.startTimeClick()"
					 		maxLength="5"
					 		ng-pattern="/^([01][0-9]|2[0-3]):([0-5][0-9])$/"
					 		required>
				</div>	   	
			</div>
		</div>
		<div class="col-md-12 form-item" 
			ng-show="editRetroactiveModel.retroactiveValue==2"
			ng-hide="editRetroactiveModel.retroactiveValue==1"
			ng-if="editRetroactiveModel.dataMorningList.length<=0">
			<div class="col-sm-3 col-md-3 form-title"></div>
			<div class="col-sm-8 col-md-8 form-input">
					原末班签退：
					<span ng-if="editRetroactiveModel.endTime != null">  
	                    {{editRetroactiveModel.endTime}}
	                </span> 
	                <span ng-if="editRetroactiveModel.endTime == null">  
	                    	无
	                </span> 
			</div>
		</div>
		<div class="col-md-12 form-item"
			 ng-show="editRetroactiveModel.retroactiveValue==2"
			 ng-hide="editRetroactiveModel.retroactiveValue==1">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>补签末班签退：</div>
			<div class="col-sm-8 col-md-8 form-input">
			 	<div class="input-group" ng-class="{ 'has-error' : editRetroactiveForm.rAEndTime.$dirty && editRetroactiveForm.rAEndTime.$invalid}">
					<input 	id="rAEndTime" 
							name="rAEndTime" 
					 		class="form-control"
					 		ng-model="editRetroactiveModel.retroactive.endTime" 
					 		ng-click="viewModel.endTimeClick()"
					 		maxLength="5"
					 		ng-pattern="/^([01][0-9]|2[0-3]):([0-5][0-9])$/"
					 		required> 			
				</div>	   	
			</div>
		</div>
		<div class="col-md-12 form-item" ng-if="editRetroactiveModel.dataMorningList.length>0">
			<div class="col-sm-3 col-md-3 form-title">选择下班签退时间：</div>
			<div class="col-sm-8 col-md-8 form-input">
				<table class="table table-striped table-bordered" cellspacing="0" width="100%">
					<thead>
						<tr>
							<th width="20%">操作</th>
							<th>日期</th>
							<th>打卡时间</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="attendance in editRetroactiveModel.dataMorningList">
							<td>
								<input name="startTime" type="radio" ng-click="editRetroactiveModel.endTimeClick(attendance)"/>
							</td>
							<td>{{attendance.attendanceDate | date:'yyyy/MM/dd'}}</td>
							<td>{{attendance.morningTime}}</td>
						</tr>
						<tr ng-if="editRetroactiveModel.dataMorningList==null || editRetroactiveModel.dataMorningList.length == 0">
							<td colspan="3" style="color: red;">
								没有数据
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="col-md-12 form-item" ng-if="editRetroactiveModel.dataMorningList.length>0">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>签到日期：</div>
			<div class="col-sm-8 col-md-8 form-input">
			 	<input readonly
			 		class="form-control" 
			 		ng-model="editRetroactiveModel.attendanceEndDate">
			</div>
		</div>
		<div class="col-md-12 form-item" ng-if="editRetroactiveModel.dataMorningList.length>0">
			<div class="col-sm-3 col-md-3 form-title">选择上班签到时间：</div>
			<div class="col-sm-8 col-md-8 form-input">
				<table class="table table-striped table-bordered" cellspacing="0" width="100%">
					<thead>
						<tr>
							<th width="20%">操作</th>
							<th>日期</th>
							<th>打卡时间</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="attendance in editRetroactiveModel.dataMorningList">
							<td>
								<input name="endTime" type="radio" ng-click="editRetroactiveModel.startTimeClick(attendance)"/>
							</td>
							<td>{{attendance.attendanceDate | date:'yyyy/MM/dd'}}</td>
							<td>{{attendance.morningTime}}</td>
						</tr>
						<tr ng-if="editRetroactiveModel.dataMorningList==null || editRetroactiveModel.dataMorningList.length == 0">
							<td colspan="3" style="color: red;">
								没有数据
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">备注：</div>
			<div class="col-sm-8 col-md-8 form-input">
			 	<textarea ng-model="editRetroactiveModel.retroactive.description" class="form-control elastic __web-inspector-hide-shortcut__" rows="3" maxLength="255"></textarea>
			</div>
		</div>
	</div>	
</form>
